<%@page import="com.fstrat.frontend.proxy.IRATMessage"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" errorPage="error.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.ArrayList"%>
<%@page import="java.security.MessageDigest"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Rent a tool Benutzerverwaltung</title>
</head>
<body>
<%@ include file="header_top.jinc" %>
<%
	String reqBtnLogin = request.getParameter("BtnLogin");
	String msg = Utils.validateStringArgument((String)session.getAttribute(UserMngt.SESSION_TO_LOGIN_PAGE_FORWARD_MSG));
	
	if(reqBtnLogin!=null)
	{
		String email = request.getParameter("loginMail");
		String password = request.getParameter("loginPwd");
		if (email == null) email = "";
		if (password == null) password = "";
		if(!UserMngt.login(email, password,session,response))
			msg = IRATMessage.ERROR_USER_LOGIN_FAILED;
	}

%>
	<div id="wrapper">
		<div id="divBody">
			<jsp:include page="login.jinc"></jsp:include>
			<jsp:include page="createUser.jinc"></jsp:include>
			<span class="MsgLogin Msg" id="spnMsg"><%=msg %></span> 
		</div>
	</div>
	<%@ include file="header_bottom.jinc" %>
</body>
</html>